home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1998 July / EnigmA AMIGA RUN 29 (1998)(G.R. Edizioni)(IT)[!][issue 1998-07 & 08].iso / recent / warpup1.lha / WarpUP-WarpOS / Source / tools / stackppc.p < prev   
Text File  |  1997-06-22  |  1KB  |  62 lines

  1.         incdir  include:
  2.         incdir  lvo:
  3.  
  4.         include powerpc/ppcmacros.i
  5.         include powerpc/powerpc.i
  6.         include powerpc/tasksppc.i
  7.  
  8.         include powerpc_lib.i
  9.         include exec_lib.i
  10.         include dos_lib.i
  11.  
  12.         xref    _SysBase
  13.         xref    _DOSBase
  14.         xref    _PowerPCBase
  15.         xref    _LinkerDB
  16.         smalldata
  17.         executable
  18.         escapestr
  19.         version 10
  20.  
  21. start
  22.         prolog  1024
  23.         push    r31
  24.         la      _d1,template
  25.         la      _d2,Array
  26.         li      _d3,0
  27.         RUN68K_XL       _DOSBase,ReadArgs
  28.         tstw    _d0
  29.         beq     .close
  30.         mr      r31,_d0
  31.         lw      r3,Array
  32.         tstw    r3
  33.         beq     .show
  34.         lwz     r4,0(r3)
  35.         CALLPOWERPC     ChangeStack
  36.         b       .done
  37. .show
  38.         li      r4,0
  39.         CALLPOWERPC     FindTaskPPC
  40.         lwz     r3,TASKPPC_STACKSIZE(r3)
  41.         sw      r3,Args
  42.         la      _d1,showsize
  43.         la      _d2,Args
  44.         RUN68K_XL       _DOSBase,VPrintf
  45. .done
  46.         mr      _d1,r31
  47.         RUN68K_XL       _DOSBase,FreeArgs
  48. .close
  49.         pop     r31
  50.         epilog
  51.  
  52.         section data
  53. template        dc.b    "SIZE/N",0
  54. showsize        dc.b    "The current PPC stack size is: %ld bytes\n",0
  55.  
  56.         section bss
  57.         ds.b    32
  58. Array           ds.l    1
  59. Args            ds.l    1
  60.         ds.b    32
  61.         even
  62.